package com.spring.demo.annotation;

import com.alibaba.fastjson.JSON;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author xuweizhi
 * @since 2023/07/14 11:40
 */
@NoArgsConstructor
@Data
public class Operator {


    @SerializedName("orgId")
    private Long orgId;

    @SerializedName("campusId")
    private Long campusId;

    @SerializedName("path")
    private String path;

    @SerializedName("operatorInfo")
    private OperatorInfoDTO operatorInfo;


    @NoArgsConstructor
    @Data
    public static class OperatorInfoDTO {
        @SerializedName("staffId")
        private Long staffId;
        @SerializedName("name")
        private String name;
        @SerializedName("deptId")
        private Long deptId;
        @SerializedName("deptName")
        private String deptName;
        @SerializedName("campusId")
        private Long campusId;
        @SerializedName("campusName")
        private String campusName;
        @SerializedName("orgId")
        private Long orgId;
        @SerializedName("orgName")
        private String orgName;
        @SerializedName("jobNumber")
        private String jobNumber;
    }

    public static void main(String[] args) {
        Operator operator = new Operator();
        operator.setOrgId(10095001L);
        operator.setCampusId(20095002L);
        operator.setPath("/hbos-thirdparty-integration/standard/common/**");
        OperatorInfoDTO operatorInfoDTO = new OperatorInfoDTO();
        operatorInfoDTO.setStaffId(79152L);
        operatorInfoDTO.setName("门诊李医生");
        operatorInfoDTO.setDeptId(30096002L);
        operatorInfoDTO.setDeptName("心血管内科门诊");
        operatorInfoDTO.setCampusId(20095002L);
        operatorInfoDTO.setCampusName("中山老年院区");
        operatorInfoDTO.setOrgId(10095001L);
        operatorInfoDTO.setOrgName("上海市老年医学中心");
        operatorInfoDTO.setJobNumber("zhongshanys001");
        operator.setOperatorInfo(operatorInfoDTO);
        System.out.println(JSON.toJSONString(operator));

    }
}
